package com.ruoyi.yqhs.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.yqhs.domain.*;
import com.ruoyi.yqhs.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Yoboo
 * @create 2025-10-29 16:16
 */
@RestController
@RequestMapping("/home")
public class HomeController extends BaseController {
    @Autowired
    private IYqhsJyzService yqhsJyzService;

    /**
     * 查询加油站信息列表
     */
    @GetMapping("/jyz/list")
    public TableDataInfo list(YqhsJyz yqhsJyz) {
        startPage();
        List<YqhsJyz> list = yqhsJyzService.selectYqhsJyzList(yqhsJyz);
        return getDataTable(list);
    }

    @Autowired
    private IYqhsSbService yqhsSbService;

    /**
     * 查询设备信息列表
     */
    @GetMapping("/sb/list")
    public TableDataInfo list(YqhsSb yqhsSb) {
        startPage();
        List<YqhsSb> list = yqhsSbService.selectYqhsSbList(yqhsSb);
        return getDataTable(list);
    }

    @Autowired
    private IYqhsYwsjcwService yqhsYwsjcwService;

    /**
     * 查询运维数据错误列表
     */
    @GetMapping("/ywsjcw/list")
    public TableDataInfo list(YqhsYwsjcw yqhsYwsjcw) {
        startPage();
        List<YqhsYwsjcw> list = yqhsYwsjcwService.selectYqhsYwsjcwList(yqhsYwsjcw);
        return getDataTable(list);
    }

    @Autowired
    private IYqhsYwsjgdService yqhsYwsjgdService;

    /**
     * 查询运维数据过多列表
     */
    @GetMapping("/ywsjgd/list")
    public TableDataInfo list(YqhsYwsjgd yqhsYwsjgd) {
        startPage();
        List<YqhsYwsjgd> list = yqhsYwsjgdService.selectYqhsYwsjgdList(yqhsYwsjgd);
        return getDataTable(list);
    }

    @Autowired
    private IYqhsYjbjService yqhsYjbjService;

    /**
     * 查询预警报警列表
     */
    @GetMapping("/yjbj/list")
    public TableDataInfo list(YqhsYjbj yqhsYjbj) {
        startPage();
        List<YqhsYjbj> list = yqhsYjbjService.selectYqhsYjbjList(yqhsYjbj);
        return getDataTable(list);
    }


    @Autowired
    private IYqhsSjdcService yqhsSjdcService;

    /**
     * 查询数据断传列表
     */
    @GetMapping("/sjdc/list")
    public TableDataInfo list(YqhsSjdc yqhsSjdc) {
        startPage();
        List<YqhsSjdc> list = yqhsSjdcService.selectYqhsSjdcList(yqhsSjdc);
        return getDataTable(list);
    }

    @Autowired
    private IYqhsQyService yqhsQyService;

    /**
     * 查询区域信息列表
     */
    @GetMapping("/qy/list")
    public AjaxResult list(YqhsQy yqhsQy) {
        List<YqhsQy> list = yqhsQyService.selectYqhsQyList(yqhsQy);
        return success(list);
    }
}
